(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/resources/Script/Ssg/Utils/LoginUtil.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '6083fYMWzFJhrrZBQ2gKTQu', 'LoginUtil', __filename);
// Script/Ssg/Utils/LoginUtil.js

'use strict';

var WXLogin = require('WXLogin');
var QQLogin = require('QQLogin');

window.LoginUtil = cc.Class({
    extends: cc.Component,

    properties: {},

    statics: {

        //加载网络图片
        channelLogin: function channelLogin(callback) {
            var self = this;
            this.login(function (isSsuccess) {
                //先从微信端拉取数据
                if (isSsuccess) {
                    callback();
                }
            });
        },

        //第三方渠道登录
        login: function login(back) {
            if (SystemInfo.getPlatform() == 'weChatGame') {
                WXLogin.startLogin(back);
            } else if (SystemInfo.getPlatform() == 'qqPlay') {
                QQLogin.startLogin(back);
            } else {
                back(true);
            }
        }

    }
});

module.exports = LoginUtil;

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=LoginUtil.js.map
        